package lab02.test05;

public class Cube {
    //定义长方体的长宽高
    private double grow;
    private double wide;
    private double high;

    //构造空参方法
    public Cube(){}

    //构造有参方法，并将其初始化
    public Cube(double grow,double wide,double high){
        this.grow=grow;
        this.high=high;
        this.wide=wide;
    }

    //通过get，set方法获取长方体的长宽高
    public double getGrow() {
        return grow;
    }

    public void setGrow(double grow) {
        this.grow = grow;
    }

    public double getWide() {
        return wide;
    }

    public void setWide(double wide) {
        this.wide = wide;
    }

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }

    //计算长方体的体积
    public double volume(double a,double b,double c){
        return a*b*c;
    }
}
